<?php
namespace app\common\service;
class Result
{
    public static function success($data = [], $msg = "")
    {
        return json(['code' => 1, 'data' => $data, 'msg' => $msg]);
    }

    public static function error($msg, $code = 400)
    {
        return json(['code' => $code, 'msg' => $msg]);
    }
}